
import { Column, Table } from 'sequelize-typescript';
import { BaseModel } from '@/model'
import { DataTypes } from "sequelize";

@Table
export class Role extends BaseModel {
  @Column({ type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true, comment: '角色Id' })
  roleId: number;

  @Column({ type: DataTypes.STRING, allowNull: false, comment: "角色标识" })
  roleCode: string;

  @Column({ type: DataTypes.STRING, allowNull: false, comment: "角色名称" })
  roleName: string;

  @Column({ type: DataTypes.INTEGER, defaultValue: 0, comment: "角色类型" })
  roleType: number;

  @Column({ type: DataTypes.STRING, comment: "角色说明" })
  roleDesc: string;

  @Column({ type: DataTypes.STRING, comment: "连表Id" })
  belongModuleId: string;

  @Column({ type: DataTypes.STRING, comment: "创建人" })
  crateBy: string;

  @Column({ type: DataTypes.STRING, comment: "更新人" })
  updateBy: string;

  @Column({ type: DataTypes.INTEGER, defaultValue: 0, comment: "排序" })
  roleSort: number;

  @Column({ type: DataTypes.STRING, defaultValue: "0", comment: "软删除" })
  delFlag: string;

  @Column({ type: DataTypes.STRING, comment: "部门Id" })
  deptId: string;

  @Column({ type: DataTypes.STRING, comment: "" })
  dsScope: string;

  @Column({ type: DataTypes.STRING, comment: "" })
  dsType: string;

  @Column({ type: DataTypes.BOOLEAN, comment: "状态" })
  enable: boolean;

  @Column({ type: DataTypes.STRING, comment: "角色模型" })
  roleClassify: string;

  @Column({ type: DataTypes.STRING, comment: "绑定菜单Id" })
  menuIds: string;
}
